package com.zlict.admin.service.impl;

import java.util.List;
import com.zlict.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zlict.admin.mapper.RdPworkhoursMapper;
import com.zlict.admin.domain.RdPworkhours;
import com.zlict.admin.service.IRdPworkhoursService;

/**
 * 研发人员工时Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-12
 */
@Service
public class RdPworkhoursServiceImpl implements IRdPworkhoursService 
{
    @Autowired
    private RdPworkhoursMapper rdPworkhoursMapper;

    /**
     * 查询研发人员工时
     * 
     * @param id 研发人员工时主键
     * @return 研发人员工时
     */
    @Override
    public RdPworkhours selectRdPworkhoursById(Long id)
    {
        return rdPworkhoursMapper.selectRdPworkhoursById(id);
    }

    /**
     * 查询研发人员工时列表
     * 
     * @param rdPworkhours 研发人员工时
     * @return 研发人员工时
     */
    @Override
    public List<RdPworkhours> selectRdPworkhoursList(RdPworkhours rdPworkhours)
    {
        return rdPworkhoursMapper.selectRdPworkhoursList(rdPworkhours);
    }

    @Override
    public List<RdPworkhours> selectRdWorkhoursByUserList(RdPworkhours rdPworkhours) {
        return rdPworkhoursMapper.selectRdWorkhoursByUserList(rdPworkhours);
    }

    /**
     * 新增研发人员工时
     * 
     * @param rdPworkhours 研发人员工时
     * @return 结果
     */
    @Override
    public int insertRdPworkhours(RdPworkhours rdPworkhours)
    {
        rdPworkhours.setCreateTime(DateUtils.getNowDate());
        return rdPworkhoursMapper.insertRdPworkhours(rdPworkhours);
    }

    /**
     * 修改研发人员工时
     * 
     * @param rdPworkhours 研发人员工时
     * @return 结果
     */
    @Override
    public int updateRdPworkhours(RdPworkhours rdPworkhours)
    {
        rdPworkhours.setUpdateTime(DateUtils.getNowDate());
        return rdPworkhoursMapper.updateRdPworkhours(rdPworkhours);
    }

    /**
     * 批量删除研发人员工时
     * 
     * @param ids 需要删除的研发人员工时主键
     * @return 结果
     */
    @Override
    public int deleteRdPworkhoursByIds(Long[] ids)
    {
        return rdPworkhoursMapper.deleteRdPworkhoursByIds(ids);
    }

    /**
     * 删除研发人员工时信息
     * 
     * @param id 研发人员工时主键
     * @return 结果
     */
    @Override
    public int deleteRdPworkhoursById(Long id)
    {
        return rdPworkhoursMapper.deleteRdPworkhoursById(id);
    }
}
